import { App } from 'vue';
import { withInstall } from '@ibiz-template/vue3-util';
import { registerPanelItemProvider } from '@ibiz-template/runtime';
import { DynamicTextExtendProvider } from './provider';
import { DynamicTextExtend } from './dynamic-text-extend';

export const IBizDynamicTextExtend = withInstall(
  DynamicTextExtend,
  function (v: App) {
    v.component(DynamicTextExtend.name, DynamicTextExtend);
    registerPanelItemProvider(
      'LIST_ITEMRENDER_DYNAMIC_TEXT_EXTEND',
      () => new DynamicTextExtendProvider(),
    );
  },
);
